//
//  UIBarButtonItem.swift
//  weibo
//
//  Created by hm on 2020/4/26.
//  Copyright © 2020 hm. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    convenience init(imageName: String) {
        self.init()
        
        let btn = UIButton()
        btn.setImage(UIImage(named: imageName), for: .normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        customView = btn
    }
}
